#ifndef SQL_H
#define SQL_H

#include "settings.h"
#include <QtSql/QtSql>
#include <QString>
#include <QFile>

class SQL {
public:
    SQL(Settings *setting);
    ~SQL();

    bool openDB();
    void closeDB();

    void insertValue(float wert, QString entity);
    void getWriteCommand();

    QString getTempCommand();
    QString getHumiCommand();

    int getEntityID(QString entity);
    int getSensorID();
    QString getAddress();
    QString getDriver();


private:
    QSqlDatabase mDb;
    QString mTempCommand, mHumiCommand;

    Settings *mSetting;
};

#endif
